<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>拖拽</title>
    
    <script src="../../jquery.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../ui/om-core.js"></script>
    <script type="text/javascript" src="../../ui/om-mouse.js"></script>
    <script type="text/javascript" src="../../ui/om-draggable.js"></script>
    <script type="text/javascript" src="../../ui/om-droppable.js"></script>
    <script type="text/javascript" src="../../ui/om-tree.js"></script>
    <link rel="stylesheet" type="text/css" href="../../themes/default/om-all.css" />
    <link rel="stylesheet" type="text/css" href="../common/css/demo.css" />
    <!-- view_source_begin -->
    <script type="text/javascript">
    var data = [
                {
                    "text": "node1",
                    "children":
                    [
                        {
                            "text": "node11"
                        },
                        {
                            "text": "node12"
                        }
                    ]
                },
                {
                    "text": "node2",
                    "expanded": true,
                    "children":
                        [{
                            "text":"node21",
                            "expanded": true,
                            "children": [{
                                "text":"node211"
                            },{
                                "text":"node212"
                            }]
                        },{
                            "text":"node22",
                            "expanded": true,
                            "children": [{
                                "text":"node221"
                            }]
                        }]
                },
                {
                    "text": "node3"
                },
                {
                    "text": "node4"
                }
            ];
        $(document).ready(function(){
            $("#mytree").omTree({
                dataSource : data,
                draggable : true
            });
        });
    </script>
    <!-- view_source_end -->
</head>
<body>
    <!-- view_source_begin -->
    <div id="main">
        <ul id="mytree">
        </ul>
    </div> 
    <!-- view_source_end -->
    <div id="view-desc">
        <p>设置属性draggable : true，支持树节点的拖拽操作。</p>
    </div>
    <script type="text/javascript" src="../common/js/themeloader.js"></script>
</body>
</html>
